package com.yuyou.fn.tas.pusher;

import com.yuyou.fn.common.util.Log;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by wens on 16-12-15.
 */
public class PusherBootstrap {

    private final static Logger log = LoggerFactory.getLogger(PusherBootstrap.class);


    public static void main(String[] args) throws InterruptedException {

        log.info("Start tas pusher app .....");
        Log.init();
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationcontext-pusher.xml");
        log.info("Success start tas pusher app");

        Runtime.getRuntime().addShutdownHook(new Thread(){
            @Override
            public void run() {
                applicationContext.close();
                log.info("Success shutdown tas pusher app");
            }
        });


    }
}
